﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogArticlesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Blog.BlogArticlesAdmin" %>
<owc:OwGrid ID="BlogArticledv" runat="server" SkinID="OwGridAdmin" DataSourceID="BlogArticleAdminOds"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace"
    AllowCustomPaging="True" AllowPaging="True">
    <MasterTableView DataSourceID="BlogArticleAdminOds" DataKeyNames="BlogArticleID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("BlogArticleID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b><i>
                                    <%# Eval("Title")%></i>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeCreatedLabelOwR" OwText="DateTimeCreatedLabel" runat="server"
                                    OwSuffix="/"></owc:OwR>
                                <owc:OwR ID="DateTimeEditedLabelOwR" OwText="DateTimeEditedLabel" runat="server"
                                    OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("DateTimeCreated").OwToDateTimePublishDate() +"-"%><%#Eval("DateTimeEdited").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="EnableOwR" OwText="Enable" runat="server"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwR ID="FromDateOwR" OwText="FromDate" OwSuffix=":" runat="server"></owc:OwR>
                                &nbsp;<%#Eval("EnableBegin").OwToDateTimePublishDate()%>&nbsp;
                                <owc:OwR ID="ToDateOwR" OwText="ToDate" OwSuffix=":" runat="server"></owc:OwR>
                                <%#Eval("EnableEnd").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="HomeDisplayLabelOwR" OwText="ToDate" OwSuffix=":" runat="server"></owc:OwR>
                            </td>
                            <td>
                                <asp:Localize ID="Localize3" Text="<%$ OwR: FromDate %>" runat="server"></asp:Localize>:&nbsp;<%#Eval("HomeDisplayBegin").OwToDateTimePublishDate()%>&nbsp;<asp:Localize
                                    ID="Localize4" Text="<%$ OwR: ToDate %>" runat="server"></asp:Localize>&nbsp;<%#Eval("HomeDisplayEnd").OwToDateTimePublishDate()%></td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="Literal2" runat="server" Text="<%$ OwR: HotLabel%>" />:
                            </td>
                            <td>
                                <asp:Localize ID="Localize5" Text="<%$ OwR: FromDate %>" runat="server"></asp:Localize>:&nbsp;<%#Eval("HotDisplayBegin").OwToDateTimePublishDate()%>&nbsp;<asp:Localize
                                    ID="Localize6" Text="<%$ OwR: ToDate %>" runat="server"></asp:Localize>&nbsp;<%#Eval("HotDisplayEnd").OwToDateTimePublishDate()%></td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="BlogOwR" runat="server" OwText="Blog" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwBlogsBLL.OwGetEntity(Eval("BlogID").OwToInt64TryParseReturn0()).Title %>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <asp:Literal ID="EnableLabel" runat="server" Text="<%$ OwR: EnableLabel%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsEnabledCheckBox" runat="server" Checked='<%# Eval("IsEnabled") %>'
                                    Text='<%# Bind("BlogArticleID") %>' OnCheckedChanged="IsEnabledCheckBox_CheckedChanged"
                                    AutoPostBack="True" CssClass="HiddenText"></owc:OwCheckBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="HomedislayOwR" runat="server" OwText="HomeDisplayLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsHomeDisplayCheckBox" runat="server" Checked='<%# Eval("IsHomeDisplay") %>'
                                    Text='<%# Bind("BlogArticleID") %>' AutoPostBack="True" CssClass="HiddenText"
                                    OnCheckedChanged="IsHomeDisplayCheckBox_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="HotLabel" runat="server" Text="<%$ OwR: HotLabel%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsHotCheckBox" runat="server" Checked='<%# Eval("IsHot") %>'
                                    AutoPostBack="True" Text='<%# Bind("BlogArticleID") %>' CssClass="HiddenText"
                                    OnCheckedChanged="IsHotCheckBox_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%# Eval("IsDeleted") %>'
                                    Text='<%# Bind("BlogArticleID") %>' AutoPostBack="True" CssClass="HiddenText" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="AllowSendPingBackOwR" runat="server" OwText="AllowSendPingBack" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="AllowSendPingBackCbb" runat="server" Checked='<%# Bind("AllowSendPingbackTrackback") %>'
                                    Text='<%# Bind("BlogArticleID") %>' AutoPostBack="True" CssClass="HiddenText"
                                    OnCheckedChanged="AllowSendPingBackCbb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="AllowReceivePingBackOwR" runat="server" OwText="AllowReceivePingBack"
                                    OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="AllowReceivePingBackCbb" runat="server" Checked='<%# Bind("AllowReceivePingbackTrackback") %>'
                                    Text='<%# Bind("BlogArticleID") %>' AutoPostBack="True" CssClass="HiddenText"
                                    OnCheckedChanged="AllowReceivePingBackCbb_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                HeaderText="<%$OwR:Modify%>" UniqueName="TemplateColumn1">
                <ItemTemplate>
                   <a href='/Admin/Views/Site/BlogArticleEdit.aspx?id=<%#Eval("BlogArticleID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" alt="" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$OwR:Deleted %>">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogArticleEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="BlogArticleAdminOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogArticlesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogArticlesBLL"
    SelectCountMethod="OwGetByDynamicCount" EnablePaging="True" UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="blogArticleID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="isHomeDisplay" Type="Boolean" />
        <asp:Parameter Name="isHot" Type="Boolean" />
        <asp:Parameter Name="enableBegin" Type="DateTime" />
        <asp:Parameter Name="enableEnd" Type="DateTime" />
        <asp:Parameter Name="homeDisplayBegin" Type="DateTime" />
        <asp:Parameter Name="homeDisplayEnd" Type="DateTime" />
        <asp:Parameter Name="hotDisplayBegin" Type="DateTime" />
        <asp:Parameter Name="hotDisplayEnd" Type="DateTime" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="allowComment" Type="Boolean" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="localityID" Type="Int64" />
        <asp:Parameter Name="isEnabled" Type="Boolean" />
        <asp:Parameter Name="blogID" Type="Int64" />
        <asp:Parameter Name="imageAlbumID" Type="Int64" />
        <asp:Parameter Name="videoPlaylistID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
